package com.aizuda.boot.modules.file.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 合同文件实体类
 *
 * @author yangshen
 * @since 2025-07-05
 */
@Data
@Accessors(chain = true)
@TableName("contract_file")
@Schema(description = "合同文件实体")
public class ContractFileEntity {

    @Schema(description = "合同文件ID，自增")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "合同ID")
    @TableField("contract_id")
    private Integer contractId;

    @Schema(description = "主版本号，默认1")
    @TableField("major_version")
    private Integer majorVersion;

    @Schema(description = "次版本号，默认0")
    @TableField("minor_version")
    private Integer minorVersion;

    @Schema(description = "文件ID")
    @TableField("file_id")
    private Long fileId;

    @Schema(description = "文件版本（对应wps修改后的版本号）")
    @TableField("file_history_version")
    private Integer fileHistoryVersion;

    @Schema(description = "创建者ID")
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "更新者ID")
    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;

    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
} 